package com.zwd.cases.demo.utilstest;

import com.alibaba.fastjson.JSONObject;
import com.zwd.cases.demo.model.Employee;
import org.assertj.core.util.Maps;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @Description TODO
 * @Author zhengwd
 * @Date 2022/9/7 10:38
 **/
class ComparatorTest {

    public static void main(String[] args) {
        /*Employee e1 = new Employee("John", 99, 3000, 9922001);
        Employee e2 = new Employee("Ace", 1, 2000, 5924001);
        Employee e3 = new Employee("Keith", 2, 4000, 3924401);

        List<Employee> employees = new ArrayList<>();
        employees.add(e1);
        employees.add(e2);
        employees.add(e3);

        List<Employee> employeesOut = null;
        employeesOut = employees.stream().filter(doct -> doct.getAge() != null).sorted(Comparator.comparing(Employee::getAge)).collect(Collectors.toList());
        List<Employee> finalEmployeesOut = employeesOut;
        employees.stream().filter(doct -> doct.getAge() == null).forEach(e-> finalEmployeesOut.add(e));

        employeesOut.forEach(System.out::println);*/


        // 封装消息
        Map<String, String> map = new HashMap();
        map.put("first", "您已创建本院就诊卡，首次就诊前请到窗口及时取卡");
        // 就诊人
        map.put("keyword1", "郑xx");
        // 卡号
        map.put("keyword2", "3522301995xxxx");
        map.put("remark", "查看详情");
        System.out.println(JSONObject.toJSONString(map));
    }
}
